<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>找回密码</title>
        <link rel="shortcut icon" href="img/logo.ico" type="image/x-icon" >
        <link rel="stylesheet" type="text/css" href="css/registAndLogin/details.css"/>
    </head>
    <script src="js/jquery-1.11.3.js" type="text/javascript" charset="utf-8"></script>


    <body>
        <div id="container">
            <form action="home.html" method="post" id="login">
                <table border="0" cellspacing="0" cellpadding="0">

                    <tr>
                        <td colspan="2" class="title">找回密码</td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="text" value="手机号" class="input" name="phoneNumber"/>
                            <input type="button" name="fasong" id="fasong" value="发送验证码" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2"><input type="text" value="验证码" class="input" name="yanzhengma"/></td>
                    </tr>


                    <tr>
                        <td colspan="2">
                            <input type="text" value="请设定密码" class="input eye" name="pwd" />
                            <input type="password" value="" class="input show" name="pwdShi" />	

                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="text" value="确认密码" class="input eye" id="pwd"/>
                            <input type="password" value="" class="input show2" id="pwdShi" />	

                        </td>
                    </tr>


                    <tr>
                        <td colspan="2"><input type="submit" value="确定" class="login"/></td>
                    </tr>

                </table>	
            </form>
        </div>
        <script>
            $(function () {


                $("#fasong").click(function () {
                    //执行获取验证码的操作
                    /*var zhi=$("input[name='phoneNumber']").val();
                     if(zhi.trim() != "手机号"){*/
                    GetNumber();
                    /*}else{
                     $(this).attr("disabled","disabled");
                     }*/

                });

                var count = 60;
                function GetNumber() {
                    $("#fasong").attr("disabled", "disabled");
                    $("#fasong").val("重新发送(" + count + ")")
                    count--;
                    if (count > 0) {
                        setTimeout(GetNumber, 1000);
                    } else {
                        $("#fasong").val("点击获取验证码");
                        $("#fasong").attr("disabled", "");
                    }
                }


                $("input[name='pwd']").focus(function () {
                    $(this).hide();
                    $(".show").show();
                    $(".show").focus();
                });
                $(".show").blur(function () {
                    if ($(this).val() == "") {
                        $(this).hide();
                        $("input[name='pwd']").show();
                    }
                });

                $("#pwd").focus(function () {
                    $(this).hide();
                    $("#pwdShi").show();
                    $("#pwdShi").focus();
                });
                $("#pwdShi").blur(function () {
                    if ($(this).val() == "") {
                        $(this).hide();
                        $("#pwd").show();
                    }
                });
                $("input[name='phoneNumber']").focus(function () {
                    $(this).val(" ");
                }).blur(function () {
                    if ($(this).val() == " ") {
                        $(this).val("手机号");
                    }
                });
                $("input[name='yanzhengma']").focus(function () {
                    $(this).val(" ");
                }).blur(function () {
                    if ($(this).val() == " ") {
                        $(this).val("验证码");
                    }
                });
            })

        </script>
    </body>
</html>
